<html>
<head>
  <title>Simple dialog</title>
  <style>
    @import url(sample-dialog-1.css);

    body { prototype:Body; }

  </style>
  <script type="text/tiscript">

    class Body : Element {
      function attached() { stdout.println("attached"); }
      function detached() { stdout.println("detached"); }
    }
   
    event click $(#close-dialog)
    {
      view.close("Hello from Dialog");
    }

    function self.closing(reason) {
      stdout.println("closing", reason);
    }

    </script>
</head>
<body>
<h1>Sample dialog</h1>

<button id="close-dialog">Close Dialog and return value</button>

</body>
</html>